<%@page language="java" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@ include file="/view/common/taglib.jsp"%>
<%@ include file="/view/common/variable.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/view/common/head.jsp"%>
<meta name="keywords" content="学而阅读,小说网,原创小说网" />
<meta name="description"
	content="学而阅读,最热门的免费小说网站,提供武侠仙侠,奇幻玄幻,科幻灵异,都市言情,穿越女频,青春校园,历史军事,网游竞技,职业官场等网络热门的书籍下载跟阅读！" />
<title>学而阅读作家后台</title>
<link type="text/css" rel="stylesheet" href="${path}/css/login.css" />

<script type="text/javascript">
	$(document).ready(function() {

	});
	function submitForm() {
		var authorAccount = $.trim($("#authorAccount").val());
		var authorPassword = $.trim($("#authorPassword").val());

		if (authorAccount != "" && authorPassword != "") {
			$.post($("#form1").attr("action"), $("#form1").serialize(),
					function(data) {
						var result = $.parseJSON(data);
						if (result.code == 0) {
							window.location.href = result.url;
						} else {
							$("#authorAccountValid").text(result.message);
							$("#authorPassword").val("");
							return false;
						}
					});
		} else {
			$("#userAccountValid").text("请输入用户名和密码!");
			return false;

		}
	}
	function getContextPath() {
		var pathName = document.location.pathname;
		var index = pathName.substr(1).indexOf("/");
		var result = pathName.substr(0, index + 1);
		return result;
	}
</script>
</head>

<body ng-app="myApp" ng-controller="myCtrl"
	style="background-color: #ffffff;">
	<div class="dtop">
		<div class="dtopn">
			<b><a><img src="<%=path%>/image/logo2.png" /></a></b> <i></i> <em>登录</em>
		</div>
	</div>

	<div class="campaign">
		<b><img src="<%=path%>/image/campaign.png"></b>
		<div class="login">
			<form id="form1" name="form1" method="post"
				action="<%=path%>/author/login">
				<ul>
					<li ng-click="select('menu1')"
						ng-class="{'loginbt':current==='menu1'}">账号登录</li>
				</ul>
				<div class="loginsub loginqh" ng-if="current==='menu1'">
					<dl>
						<dd>
							<input type="text" class="account" name="authorAccount"
								id="authorAccount" placeholder="账号" />
						</dd>
						<dd>
							<input type="password" class="password" name="authorPassword"
								id="authorPassword" placeholder="密码" />
						</dd>
					</dl>
					<div>
						<span id="authorAccountValid" style="color: red;"></span>
					</div>
					<a class="dsub" onclick="submitForm();return false;">登 录</a>
					<div class="loginbottoma" style="font-size: 14px;">
						<a href="${path}/author/toRegister">作者注册</a>
					</div>
				</div>
			</form>
		</div>
	</div>
</body>
</html>